//
//  MyAccountFuctionCell.m
//  Kjs
//
//  Created by cfq on 16/4/17.
//  Copyright © 2016年 kjs. All rights reserved.
//

#import "MyAccountFuctionCell.h"
#import "UIImage+MapUIImage.h"

@interface MyAccountFuctionCell()
@property (weak, nonatomic) IBOutlet UIImageView *functionDisplayImage;
@property (weak, nonatomic) IBOutlet UILabel *functionDescriptionText;
@property (weak, nonatomic) IBOutlet UIImageView *arrowImage;

@property (weak, nonatomic) IBOutlet UIView *separatorView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *separatorViewLC;

@end

@implementation MyAccountFuctionCell

- (void)awakeFromNib {
    self.arrowImage.image = [UIImage drawArrowWithDirection:DirectionTypeRight];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setType:(FunctionCellType)type {
    _type = type;
    self.functionDescriptionText.text = [self descriptionTextArray][type];
    self.functionDisplayImage.image = [UIImage imageNamed:[self descriptionImageArray][type]];
}
- (NSArray <NSString *> *) descriptionImageArray {
    return @[@"account-pandect",@"account-invest",@"account-financing",@"account-flowing",@"account-security"];
}

- (NSArray <NSString *> *) descriptionTextArray {
    return @[@"账户总览",@"投资管理",@"融资管理",@"资金流水",@"安全设置"];
}

- (void)setFirstCell:(BOOL)firstCell {
    _firstCell = firstCell;
//    if (!firstCell) {
        self.separatorViewLC.constant = 0.0;
//    }
    
}
@end
